import request from '@/utils/httpRequest'

// 主播列表获取
export function getAnchorList (params = {}) {
  return request({
    url: '/live-bzb-manage/anchor/query',
    method: 'get',
    params
  })
}

// 主播冻结
export function setAnchorFreeze (data = {}) {
  return request({
    url: `/live-bzb-manage/anchor/freeze/${data.userId}`,
    method: 'post',
    data
  })
}
// 主播解冻
export function setAnchorUnfreeze (data = {}) {
  return request({
    url: `/live-bzb-manage/anchor/unfreeze/${data}`,
    method: 'post'
  })
}

// 主播审核通过
export function setAnchorReivewPass (data) {
  return request({
    url: `/live-bzb-manage/anchor/review/pass/${data.id}`,
    method: 'post',
    data: { type: data.type}
  })
}
//主播审核拒绝
export function setAnchorReviewReject (id, data = {}) {
  return request({
    url: `/live-bzb-manage/anchor/review/reject/${id}`,
    method: 'post',
    data
  })
}
// 主播审核列表
export function getAnchorReviewQuery (params = {}) {
  return request({
    url: '/live-bzb-manage/anchor/review/query',
    method: 'get',
    params
  })
}

//结束直播
export function setStopLive (id, data = {}) {
  return request({
    url: `/live-bzb-manage/live/end/${id}`,
    method: 'post',
    data
  })
}

//直播禁用
export function setForbiddenLive (id, data = {}) {
  return request({
    url: `/live-bzb-manage/live/forbidden/${id}`,
    method: 'post',
    data
  })
}
//直播监控列表
export function getMonitorLiveList (params = {}) {
  return request({
    url: `/live-bzb-manage/live/monitor/query`,
    method: 'get',
    params
  })
}
// 直播预告列表
export function getLiveNoticeList (params = {}) {
  return request({
    url: `/live-bzb-manage/live/notice/query`,
    method: 'get',
    params
  })
}
//直播审核通过
export function setLiveReviewPass (data = {}) {
  return request({
    url: `/live-bzb-manage/live/pass/${data}`,
    method: 'post'
  })
}

// 查看直播间详情信息
export function getLiveDetail (id) {
  return request({
    url: `/live-bzb-manage/live/query/${id}`,
    method: 'get'
  })
}
// 查看直播间数据
export function getLiveData (id) {
  return request({
    url: `/live-bzb-manage/live/query/data/${id}`,
    method: 'get'
  })
}
// 直播审核拒绝
export function setLiveReviewReject (id, data = {}) {
  return request({
    url: `/live-bzb-manage/live/reject/${id}`,
    method: 'post',
    data
  })
}

//删除直播
export function deletLive (id) {
  return request({
    url: `/live-bzb-manage/live/remove/${id}`,
    method: 'post'
  })
}

//商品详情
export function getGoodsDetail (id) {
  return request({
    url: `/live-bzb-manage/live/goods/${id}`,
    method: 'get'
  })
}
//添加人气
export function popularityBrush (data) {
  return request({
    url: `/live-bzb-manage/live/popularity/brush`,
    method: 'post',
    data
  })
}
//帮助中心列表获取
export function getHelpList (params = {}) {
  return request({
    url: '/live-bzb-manage/system/help/list',
    method: 'get',
    params
  })
}

// 帮助中心数据更新
export function updateHelpList (data = {}) {
  return request({
    url: '/live-bzb-manage/system/help/update',
    method: 'post',
    data
  })
}

// 获取系统参数设置
export function getSystemTime (params = {}) {
  return request({
    url: '/live-bzb-manage/setting/list',
    method: 'get',
    params
  })
}

// 更新系统时间
export function updateSystemTime (data = {}) {
  return request({
    url: '/live-bzb-manage/setting/list/update',
    method: 'post',
    data
  })
}
// 设置房间隐藏状态
export function setShowApp(data = {}) {
  return request({
    url: '/live-bzb-manage/live/show-app/update',
    method: 'post',
    data
  })
}

// 查询抽奖列表
export function getDrawList(params = {}) {
  return request({
    url: '/live-bzb-manage/live/draw-list/all',
    method: 'get',
    params
  })
}

// 查询某次抽奖所有的中奖者列表数据
export function getWinnerList(params = {}) {
  return request({
    url: '/live-bzb-manage/live/winner-list/all',
    method: 'get',
    params
  })
}

// 查询某次抽奖所有的中奖者列表数据
export function setAnchorType(data = {}) {
  return request({
    url: '/live-bzb-manage/anchor/type-setting',
    method: 'post',
    data
  })
}


